package com.sright.bcard.user.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.user.dal.dao.VisitorAnalysisDAO;
import com.sright.bcard.user.dal.entity.VisitorAnalysisDO;
import com.sright.bcard.user.dal.mapper.VisitorAnalysisMapper;
import com.sright.bcard.user.dal.query.AnalysisListParamQuery;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class VisitorAnalysisDAOImpl extends BaseDAOImpl<VisitorAnalysisDO> implements VisitorAnalysisDAO {

    @Resource
    private VisitorAnalysisMapper visitorAnalysisMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return visitorAnalysisMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<VisitorAnalysisDO> selectByEnterpriseId(Long enterpriseId) {
        return visitorAnalysisMapper.selectByEnterpriseId(enterpriseId);
    }

    @Override
    public List<VisitorAnalysisDO> selectPageList(AnalysisListParamQuery analysisListParamQuery) {
        return visitorAnalysisMapper.selectPageList(analysisListParamQuery);
    }

    @Override
    public Integer count(AnalysisListParamQuery analysisListParamQuery) {
        return visitorAnalysisMapper.count(analysisListParamQuery);
    }

    @Override
    public VisitorAnalysisDO selectByMemberIdAndEnterpriseId(Long memberId, Long enterpriseId) {
        return visitorAnalysisMapper.selectByMemberIdAndEnterpriseId(memberId,enterpriseId);
    }

    @Override
    protected BaseMapper<VisitorAnalysisDO> getObjMapper() {
        return visitorAnalysisMapper;
    }
}
